<template>
	<div class="movieNews">
		<div class="head">
			<i @click="$router.go(-1)" class="iconfont icon-zuo"></i>
			<i class="iconfont icon-fenxiang"></i>
		</div>
		<div class="articleHead">
			<h2>{{allContent.title}}</h2>
			<div>
				<span>{{allContent.time}}</span>
				<div>
					<span>{{allContent.commentCount}}</span>
					<span>相关电影/影人</span>
				</div>
			</div>
		</div>
		<div class="content" v-html="content"></div>
	</div>
</template>

<script>
	export default {
		name: "movieNews",
		data(){
			return{
				content: "",
				allContent: ""
			}
		},
		created(){
			this.$http.get("/api/news",{
				params: {
					id: this.$route.params.id
				}
			}).then(res=>{
				// console.log(res)
				this.content = res.data.data.content;
				this.allContent = res.data.data;
			})
		}
	}
</script>

<style lang="scss" scoped>
	@import '~@/assets/css/common.scss';
	@import '~@/assets/css/style.css';

	.movieNews{
		.head{
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: vw(10) vw(20);
			background: #222;
			i{
				color: #eee;
				font-size: vw(20);
			}
		}
		.articleHead{
			padding: 0 vw(20);
			margin-top: vw(16);
			h2{
				font-size: vw(20);
			}
			div{
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: vw(10) 0;
				span{
					color: #bbb;
					font-size: vw(12);
				}
				div{
					span{
						margin-right: vw(16);
						font-size: vw(12);
						color: #0085ff;
					}
				}
			}
		}
		.content{
			padding: vw(20);
		}
	}
</style>
